package com.tongji.diy.utils
{
	/**
	 * 
	 * @author Sun
	 * 
	 */
	
	public class ArcBorderUtils
	{
		public static const STEP:Number = 0.10;
		public static const N:uint = 2;
		
		public static function bez(n:uint,k:uint,i:Number):Number
		{
			return factorial(n)/(factorial(k)*factorial(n-k))*Math.pow(i,k)*Math.pow(1-i,n-k);
		}
		
		private static function factorial(v:uint):uint
		{
			if(v<0)
				return 0;
			if(!v)
				return 1;
			var r:uint = 1;
			for(;v>1;v--)
				r*=v;
			return r;
		}
	}
}

